package com.yydream.controller;

import com.yydream.common.utils.R;
import com.yydream.dto.SysAdministrativeAreaDTO;
import com.yydream.service.SysAdministrativeAreaService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "行政区划功能接口")
@RestController
public class SysAdministrativeAreaController {

    @Autowired
    private SysAdministrativeAreaService sysAdministrativeAreaService;

    @ApiOperation("获取行政区划数据接口")
    @GetMapping("/areas/data")
    public R areasData (SysAdministrativeAreaDTO sysAdministrativeAreaDTO) {
        return sysAdministrativeAreaService.areasData(sysAdministrativeAreaDTO);
    }

}
